﻿<s:SurfaceWindow x:Class="SurfaceApplication3.EventWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
        Title="Events" Background="#B0CAB8" 
        Height="800" Width="1024"
                 MaxHeight="800" MaxWidth="1024"
        ResizeMode="NoResize"
                 >

    <Window.Resources>
        <Style TargetType="ListBoxItem">
            <Style.Resources>
                <!--SelectedItem with focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                <!--SelectedItem without focus-->
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>
            </Style.Resources>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="true">
                    <Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style TargetType="s:SurfaceButton">
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Background" Value="#FF076F72"/>
            <Setter Property="Padding" Value="8,4" />
            <Setter Property="Margin" Value="4" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="s:SurfaceButton">
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Background" Value="Gray" />
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Background" >
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                                            <GradientStop Color="#FF90DDFF" Offset="0.35"/>
                                            <GradientStop Color="LightBlue" Offset="0.95"/>
                                            <GradientStop Color="#FF81DDFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>

                        </ControlTemplate.Triggers>

                        <Border CornerRadius="7" Margin="0" Background="{TemplateBinding Background}" BorderBrush="#227174" BorderThickness="2">
                            <ContentPresenter 
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                >
                            </ContentPresenter>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid>

        <Canvas Name="mainCanvas" Height="800" Width="1024">
            <s:SurfaceButton x:Name="addEvent" Content="Add New Event" Foreground="White" Height="46" Canvas.Top="8" Canvas.Left="9" Click="addEvent_Click" Width="146" />

            <s:SurfaceListBox x:Name="EntryListBox" Height="680" Width="995" Canvas.Left="5" Canvas.Top="69" BorderThickness="3" BorderBrush="#227174"/>
            <Label Canvas.Top="8" Canvas.Left="155" Content="Events" Width="691" Height="57" Name="WindowName" FontSize="40" FontWeight="Bold" HorizontalContentAlignment="Center" Background="{x:Null}" Foreground="Black" />
        </Canvas>

    </Grid>
</s:SurfaceWindow>
